#pragma once

#include "stdafx.h"

class color
{
public:

	float r;
	float g;
	float b;
	float a;

	color();
	color(float R, float G, float B, float A);
	color(float R, float G, float B);
	color(float RGB);
	color(int R, int G, int B, int A);
	color(int R, int G, int B);
	color(std::string colorName);
	~color();

	void getColorFromXML(std::ifstream &file);

	void add(color other);

	void setColor(color other);
	static void setExposure(double exp);
	
	color operator+( const color &other );
	color & operator+=( const color &other );
	color operator-( const color &other );
	color & operator-=( const color &other );
	color operator*( const color &other );
	color operator*( const double &scalar );
	color operator*( const float &scalar );
	color operator*( const int &scalar );
	color & operator*=( const color &other );
	color & operator*=( const double &scalar );
	color & operator*=( const float &scalar );
	color & operator*=( const int &scalar );
	color operator/( const color &other );
	color operator/( const double &scalar );
	color operator/( const float &scalar );
	color operator/( const int &scalar );
	color & operator/=( const color &other );
	color & operator/=( const double &scalar );
	color & operator/=( const float &scalar );
	color & operator/=( const int &scalar );
	color & operator=( const color &other );
	bool operator==( const color &other );
	bool operator!=( const color &other );
	void validate();
protected:
	static double Exposure;

};